package config.table.xls;
import game.tools.xls.Xls;
import game.tools.xls.XlsXSSF;
import game.tools.xls.XlsXSSF.NumberType;

public class Test 
{
	private static final String XlsPath = "D:\\Public\\TableTool\\xls\\ContestantTable.xlsx";
	
	public static void main(String[] args) 
	{
		test1();
	}
	
	
	private static void test1()
	{
		Xls xls = new XlsXSSF(XlsPath , NumberType.Long);
		int maxRowCount = xls.getRowCount();
		int maxColumnCount = xls.getColumnCount();
		long startTime = System.currentTimeMillis();
		long speedTime = System.currentTimeMillis();
		long speedCount = 0;
		for (int i = 0 ; i <= maxRowCount; i++) 
		{
			for (int j = 0 , length = maxColumnCount; j < length; j++) 
			{
				String value = xls.getCell(i, j);
				if(value != null)
					value = value.trim();
				
				long nowTime = System.currentTimeMillis();
				long gapTime = nowTime - speedTime;
				if(gapTime >= 1000)
				{
					System.out.println("speedCount " + speedCount);
					speedTime = nowTime;
					speedCount = 0;
				}
				speedCount++;
			}
		}
		
		long endTime = System.currentTimeMillis();
		System.out.println("test1: " + (endTime - startTime));
	}
}
